#!/bin/sh
dev=$1
ceph osd create
mkdir -p /var/lib/ceph/osd/ceph-0
mkfs.xfs -f /dev/sdb
mount /dev/sdb /var/lib/ceph/osd/ceph-0
mount -o remount,user_xattr /var/lib/ceph/osd/ceph-0
ceph-osd -i 0 --mkfs --mkkey 
ceph auth add osd.0 osd 'allow *' mon 'allow profile osd' -i /var/lib/ceph/osd/ceph-0/keyring
ceph osd crush add-bucket node1 host
ceph osd crush move node1 root=default
ceph osd crush add osd.0 1.0 host=node1
touch /var/lib/ceph/osd/ceph-0/sysvinit
/etc/init.d/ceph start osd.0

